package org.chen.wordwave.bean;

import androidx.annotation.NonNull;

public class Lesson {
    private Long id;
    private String title;
    private String description;
    private String duration;
    private String videoUrl;
    private String coverImage;
    private Integer lessonNumber;
    private String category;
    private Integer viewCount;

    public Lesson() {}

    public Lesson(String title, String description, String duration) {
        this.title = title;
        this.description = description;
        this.duration = duration;
    }

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }

    public String getDescription() { return description; }
    public void setDescription(String description) { this.description = description; }

    public String getDuration() { return duration; }
    public void setDuration(String duration) { this.duration = duration; }

    public String getVideoUrl() { return videoUrl; }
    public void setVideoUrl(String videoUrl) { this.videoUrl = videoUrl; }

    public String getCoverImage() { return coverImage; }
    public void setCoverImage(String coverImage) { this.coverImage = coverImage; }

    public Integer getLessonNumber() { return lessonNumber; }
    public void setLessonNumber(Integer lessonNumber) { this.lessonNumber = lessonNumber; }

    public String getCategory() { return category; }
    public void setCategory(String category) { this.category = category; }

    public Integer getViewCount() { return viewCount; }
    public void setViewCount(Integer viewCount) { this.viewCount = viewCount; }

    // 兼容原有方法
    public String getStart() { return description; }
    public void setStart(String start) { this.description = start; }

    public String getTimes() { return duration; }
    public void setTimes(String times) { this.duration = times; }

    @NonNull
    @Override
    public String toString() {
        return "Lesson{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", duration='" + duration + '\'' +
                ", videoUrl='" + videoUrl + '\'' +
                ", lessonNumber=" + lessonNumber +
                '}';
    }
}
